#!/usr/bin/env python
import re
fd = open("data.txt")
ofd = open("outData.txt", "w")

lines = []

while True:
    line = fd.readline()
    if not line:
        break
    fields = line.split()
    fields[1] = re.sub(r"_", " ", fields[1])
    lines.append(fields)

print >> ofd, " >>> NAME <<< \n"
for fields in lines:
    print >> ofd, "\"%s\"," %(fields[1]),

print >> ofd, "\n >>> HP <<< \n"
for fields in lines:
    print >> ofd, "%s," %(fields[2]),

print >> ofd, "\n >>> ATK <<< \n"
for fields in lines:
    print >> ofd, "%s," %(fields[3]),

print >> ofd, "\n >>> DEF <<< \n"
for fields in lines:
    print >> ofd, "%s," %(fields[4]),

print >> ofd, "\n >>> SPD <<< \n"
for fields in lines:
    print >> ofd, "%s," %(fields[5]),
